from threading import Thread
import graf

class Soccer3DGui:
    '''  Graphical User Interface
    '''
    def __init__(self, geom=(800, 600), fs=0):
        self.main = graf.GuiImpl(geom, fs)
	
    def render(self):
        self.main.render()

    def run(self):
        self.main.loop()	
       
    def setPlayers(self, team):
        self.main.setPlayers(team)

    def newState(self, state, start=True):
        self.main.SetState(state, start)
        
    def setCallback(self, callback):
        self.main.SetCallBack(callback)
    
    def setScoring(self, local, visitant):
        #FIXME: Is this information in the GameState structure ?
        self.main.SetScoring(local, visitant)

if __name__ == '__main__':	
	kk = Soccer3DGui()
	print("Abans de start")
	#kk.start()
	#kk.SetScoring(3,4)
	#kk.join()

	
